package JAVA300.第十一章多线程;

/**
 * 阻塞状态-sleep
 * 模拟倒计时
 */
public class thread_11_threadState_blocked1_sleep {
    public static void main(String[] args) {
       int num = 10;
       while (num >0){
           try {
               Thread.sleep(1000);//每隔1s进行输出
               System.out.println(num--);
           } catch (InterruptedException e) {
               e.printStackTrace();
           }
       }
    }
}


